﻿using System.Text.RegularExpressions;

namespace Kaspersky.Test.RecursiveLinkLogger
{
    /// <summary>
    /// Searches for HTML links in a string using a Regex, that doesn't want 'http://' prefix
    /// </summary>
    public class RegexLinkExtractor : RegexLinkExtractorBase
    {
        public RegexLinkExtractor()
        {
            // initializing with regex, that doesn't want 'http://' prefix
            this.UrlRegex = new Regex
            (
                "<a [^<>]*href\\s*=\\s*\"(?<1>[^\"]+)\"",
                RegexOptions.IgnoreCase | RegexOptions.Compiled
            );
        }
    }
}
